package com.playmodule.vr.utils;

import android.util.Log;

public class FPSCounter
{
  int frames = 0;
  long startTime = System.nanoTime();
  
  public void logFrame()
  {
    this.frames = (1 + this.frames);
    if (System.nanoTime() - this.startTime >= 1000000000L)
    {
      Log.d("FPSCounter", "fps: " + this.frames);
      this.frames = 0;
      this.startTime = System.nanoTime();
    }
  }
}
